import { createRouter, createWebHistory,createWebHashHistory } from 'vue-router'
import Props from '@/pages/01-props/Father.vue'
import Emits from '@/pages/02-custom-emits/Father.vue'
import Model from '@/pages/03-v-model/Father.vue'
import Mitter from '@/pages/04-mitter/Father.vue'
import Attrs from '@/pages/05-$attrs/Father.vue'
import Provide from '@/pages/06-provide-inject/Father.vue'
import RP from '@/pages/07-$refs和$parent/Father.vue'
import C01 from '@/pages/08-默认插槽/Father.vue'
import C02 from '@/pages/09-具名插槽/Father.vue'
import C03 from '@/pages/10-作用域插槽/Father.vue'
//创建路由对象
const router = createRouter({
    history:createWebHistory(),//history模式和hash模式
    //配置路由的规则
    //key-路径映射到对应的组件
    routes:[
        {
            path:'/props',
            component:Props
        },{
            path:'/emits',
            component:Emits
        },{
            path:'/model',
            component:Model
        },{
            path:'/mitter',
            component:Mitter
        },{
            path:'/attrs',
            component:Attrs
        },{
            path:'/provide',
            component:Provide
        },{
            path:'/rp',
            component:RP
        },{
            path:'/c01',
            component:C01
        },
        {
            path:'/c02',
            component:C02
        },{
            path:'/c03',
            component:C03
        }
    ]
})
//router需要暴露出去
export default router